package cn.alm.allinoneboot.common;

import lombok.Data;

@Data
public class CommonResult {

    private Boolean success;
    private Integer code;
    private String message;
    private Object data;

    public void ok() {
        this.success = true;
        this.code = 200;
        this.message = "请求成功";
    }

    public void error() {
        this.success = false;
        this.code = 500;
        this.message = "请求失败";
    }

}
